package com.doraro.platform.module.user.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;


public enum SysMenuType implements IEnum<Integer> {

    /**
     * 菜单类型(0-目录(无页面),1-导航菜单(有页面),2-功能按钮)
     */
    DIR(0, "目录"),
    MENU(1, "导航菜单"),
    BUTTON(2, "功能按钮");

    @EnumValue
    private final int value;
    private String type;

    SysMenuType(final Integer value, String type) {
        this.value = value;
        this.type = type;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    @JsonValue
    public String getType() {
        return type;
    }

    @Override
    public String toString() {
        return this.getType();
    }
}
